<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="常用HTML标签+CSS样式 HTML标签及其语义  div  division   区块（块元素）    span">
<meta property="og:type" content="article">
<meta property="og:title" content="常用HTML标签+CSS样式">
<meta property="og:url" content="http://example.com/post/%E5%B8%B8%E7%94%A8HTML%E6%A0%87%E7%AD%BE+CSS%E6%A0%B7%E5%BC%8F.html">
<meta property="og:site_name" content="Key">
<meta property="og:description" content="常用HTML标签+CSS样式 HTML标签及其语义  div  division   区块（块元素）    span">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://s2.loli.net/2022/03/21/rKpo8Lb6jvXtVZG.png">
<meta property="og:image" content="http://example.com/post/%E5%AE%B9%E5%99%A8%E5%B1%9E%E6%80%A7.jpg">
<meta property="article:published_time" content="2022-03-21T00:16:54.000Z">
<meta property="article:modified_time" content="2022-03-28T10:03:29.072Z">
<meta property="article:author" content="Key">
<meta property="article:tag" content="HTML">
<meta property="article:tag" content="CSS">
<meta property="article:tag" content="HTML标签">
<meta property="article:tag" content="CSS样式">
<meta property="article:tag" content="常用的">
<meta property="article:tag" content="网页动画">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://s2.loli.net/2022/03/21/rKpo8Lb6jvXtVZG.png">

<link rel="canonical" href="http://example.com/post/%E5%B8%B8%E7%94%A8HTML%E6%A0%87%E7%AD%BE+CSS%E6%A0%B7%E5%BC%8F.html">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>常用HTML标签+CSS样式 | Key</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Key</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container"></div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="algolia-results">
  <div id="algolia-stats"></div>
  <div id="algolia-hits"></div>
  <div id="algolia-pagination" class="algolia-pagination"></div>
</div>

      
    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/post/%E5%B8%B8%E7%94%A8HTML%E6%A0%87%E7%AD%BE+CSS%E6%A0%B7%E5%BC%8F.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.loli.net/2022/03/20/DnZUvt5SucgoGk3.jpg">
      <meta itemprop="name" content="Key">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Key">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          常用HTML标签+CSS样式
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2022-03-21 08:16:54" itemprop="dateCreated datePublished" datetime="2022-03-21T08:16:54+08:00">2022-03-21</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2022-03-28 18:03:29" itemprop="dateModified" datetime="2022-03-28T18:03:29+08:00">2022-03-28</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="常用HTML标签-CSS样式"><a href="#常用HTML标签-CSS样式" class="headerlink" title="常用HTML标签+CSS样式"></a>常用HTML标签+CSS样式</h1><ul>
<li><p>HTML标签及其语义</p>
<ul>
<li><p>div</p>
<ul>
<li><p>division </p>
</li>
<li><p>区块（块元素）</p>
</li>
</ul>
</li>
<li><p>span  <span id="more"></span></p>
<ul>
<li><p>span</p>
</li>
<li><p>区块（行内元素）</p>
</li>
</ul>
</li>
<li><p>p</p>
<ul>
<li><p>paragraph</p>
</li>
<li><p>段落</p>
</li>
</ul>
</li>
<li><p>ol</p>
<ul>
<li><p>ordered list</p>
</li>
<li><p>有序列表</p>
</li>
</ul>
</li>
<li><p>ul</p>
<ul>
<li><p>unordered list</p>
</li>
<li><p>无序列表</p>
</li>
</ul>
</li>
<li><p>li</p>
<ul>
<li><p>list item</p>
</li>
<li><p>列表项</p>
</li>
</ul>
</li>
<li><p>dl</p>
<ul>
<li><p>definition list</p>
</li>
<li><p>定义列表</p>
</li>
</ul>
</li>
<li><p>dt</p>
<ul>
<li><p>definition term</p>
</li>
<li><p>定义列表标题（术语）</p>
</li>
</ul>
</li>
<li><p>dd</p>
<ul>
<li><p>definition description</p>
</li>
<li><p>定义列表项（描述）</p>
</li>
</ul>
</li>
<li><p>h1~h6</p>
<ul>
<li><p>header1~header6</p>
</li>
<li><p>1~6级标题</p>
</li>
</ul>
</li>
<li><p>hr</p>
<ul>
<li><p>horizontal rule</p>
</li>
<li><p>水平线</p>
</li>
</ul>
</li>
<li><p>a</p>
<ul>
<li><p>anchor</p>
</li>
<li><p>超链接</p>
</li>
</ul>
</li>
<li><p>strong</p>
<ul>
<li><p>strong</p>
</li>
<li><p>粗体（强调）</p>
</li>
</ul>
</li>
<li><p>em</p>
<ul>
<li><p>emphasized</p>
</li>
<li><p>斜体（强调）</p>
</li>
</ul>
</li>
<li><p>table</p>
<ul>
<li><p>table</p>
</li>
<li><p>表格</p>
</li>
</ul>
</li>
<li><p>thead</p>
<ul>
<li><p>table head</p>
</li>
<li><p>表头</p>
</li>
</ul>
</li>
<li><p>tbody</p>
<ul>
<li><p>table body</p>
</li>
<li><p>表身</p>
</li>
</ul>
</li>
<li><p>tfoot</p>
<ul>
<li><p>table foot</p>
</li>
<li><p>表脚</p>
</li>
</ul>
</li>
<li><p>th</p>
<ul>
<li><p>table header</p>
</li>
<li><p>表头单元格</p>
</li>
</ul>
</li>
<li><p>td</p>
<ul>
<li><p>table data cell</p>
</li>
<li><p>表身单元格</p>
</li>
</ul>
</li>
<li><p>caption</p>
<ul>
<li><p>caption</p>
</li>
<li><p>标题（用于表格和表单）</p>
</li>
</ul>
</li>
<li><p>form</p>
<ul>
<li><p>form</p>
</li>
<li><p>表单</p>
</li>
</ul>
</li>
<li><p>fieldset</p>
<ul>
<li><p>fieldset</p>
</li>
<li><p>表单域（用于表单）</p>
</li>
</ul>
</li>
<li><p>legend</p>
<ul>
<li><p>legend</p>
</li>
<li><p>图例（用于表单）</p>
</li>
</ul>
</li>
<li><p>figure</p>
<ul>
<li><p>figure</p>
</li>
<li><p>图片域（用于图片）</p>
</li>
</ul>
</li>
<li><p>figcaption</p>
<ul>
<li><p>figure caption</p>
</li>
<li><p>图片域标题（用于图片）</p>
</li>
</ul>
</li>
<li><p>sup</p>
<ul>
<li><p>superscript</p>
</li>
<li><p>上标</p>
</li>
</ul>
</li>
<li><p>sb</p>
<ul>
<li><p>subscript</p>
</li>
<li><p>下标</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>常用表单标签</p>
<ul>
<li><p><code>&lt;input type=&quot;text&quot; placeholder=&quot;占位符&quot;/&gt;</code></p>
<ul>
<li>单行文本框</li>
</ul>
</li>
<li><p><code>&lt;input type=&quot;password&quot;/&gt;</code></p>
<ul>
<li>密码文本框</li>
</ul>
</li>
<li><p><code>&lt;input type=&quot;radio&quot;/&gt;</code></p>
<ul>
<li>单选框</li>
</ul>
</li>
<li><p><code>&lt;input type=&quot;checkbox&quot;/&gt;</code></p>
<ul>
<li>多选框</li>
</ul>
</li>
<li><p><code>&lt;input type=&quot;button&quot;/&gt;</code></p>
<ul>
<li>普通按钮</li>
</ul>
</li>
<li><p><code>&lt;input type=&quot;submit&quot;/&gt;</code></p>
<ul>
<li>提交按钮</li>
</ul>
</li>
<li><p><code>&lt;input type=&quot;reset&quot;/&gt;</code></p>
<ul>
<li>重置按钮</li>
</ul>
</li>
<li><p><code>&lt;input type=&quot;file&quot;/&gt;</code></p>
<ul>
<li>文件域（上传文件）</li>
</ul>
</li>
<li><p><code>&lt;textarea&gt;&lt;/textarea&gt;</code></p>
<ul>
<li>多行文本框</li>
</ul>
</li>
<li><p><code>&lt;select&gt;&lt;/select&gt;</code></p>
<ul>
<li>下拉列表</li>
</ul>
</li>
</ul>
</li>
<li><p>CSS常用属性</p>
<ul>
<li><p>字体样式</p>
<ul>
<li><p>font-family</p>
<ul>
<li>字体类型</li>
</ul>
</li>
<li><p>font-size</p>
<ul>
<li>字体大小</li>
</ul>
</li>
<li><p>font-weight</p>
<ul>
<li>字体粗细</li>
</ul>
</li>
<li><p>font-style</p>
<ul>
<li>字体风格</li>
</ul>
</li>
<li><p>color</p>
<ul>
<li>字体颜色</li>
</ul>
</li>
</ul>
</li>
<li><p>文本样式</p>
<ul>
<li><p>text-indent</p>
<ul>
<li>首行缩进</li>
</ul>
</li>
<li><p>text-align</p>
<ul>
<li>水平对齐</li>
</ul>
</li>
<li><p>text-decoration</p>
<ul>
<li>文本修饰</li>
</ul>
</li>
<li><p>text-transform</p>
<ul>
<li>大小写转换</li>
</ul>
</li>
<li><p>line-height</p>
<ul>
<li>行高</li>
</ul>
</li>
<li><p>letter-spacing</p>
<ul>
<li>字间距</li>
</ul>
</li>
<li><p>word-spacing</p>
<ul>
<li>词间距（只针对英文）</li>
</ul>
</li>
</ul>
</li>
<li><p>鼠标样式</p>
<ul>
<li><p>cursor：</p>
<ul>
<li><p>context-menu        表示上下文菜单可用</p>
</li>
<li><p>help        表示有帮助</p>
</li>
<li><p>pointer        表示一个链接</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>边框样式</p>
<ul>
<li><p>border</p>
<ul>
<li>边框整体样式</li>
</ul>
</li>
<li><p>border-weight</p>
<ul>
<li>边框宽度</li>
</ul>
</li>
<li><p>border-style</p>
<ul>
<li>边框样式</li>
</ul>
</li>
<li><p>border-color</p>
<ul>
<li>边框颜色</li>
</ul>
</li>
</ul>
</li>
<li><p>列表样式</p>
<ul>
<li><p>list-style-type</p>
<ul>
<li>列表项符号</li>
</ul>
</li>
<li><p>list-style-image</p>
<ul>
<li>列表项图片</li>
</ul>
</li>
</ul>
</li>
<li><p>表格样式</p>
<ul>
<li><p>caption-side</p>
<ul>
<li>标题位置</li>
</ul>
</li>
<li><p>border-collapse</p>
<ul>
<li>边框合并</li>
</ul>
</li>
<li><p>border-spacing</p>
<ul>
<li>边框间距</li>
</ul>
</li>
</ul>
</li>
<li><p>图片样式</p>
<ul>
<li><p>width</p>
<ul>
<li>宽度</li>
</ul>
</li>
<li><p>height</p>
<ul>
<li>高度</li>
</ul>
</li>
<li><p>border</p>
<ul>
<li>边框</li>
</ul>
</li>
<li><p>text-align</p>
<ul>
<li>图片对齐</li>
</ul>
</li>
<li><p>float</p>
<ul>
<li>文字宽饶</li>
</ul>
</li>
</ul>
</li>
<li><p>背景样式</p>
<ul>
<li><p>background-image</p>
<ul>
<li>背景图片地址</li>
</ul>
</li>
<li><p>background-repeat</p>
<ul>
<li>背景图片重复</li>
</ul>
</li>
<li><p>background-position</p>
<ul>
<li>背景图片位置</li>
</ul>
</li>
<li><p>background-attachment</p>
<ul>
<li>背景图片固定 </li>
</ul>
</li>
<li><p>background-size</p>
<ul>
<li><p>背景图片的大小</p>
</li>
<li><p>属性：</p>
<ul>
<li><p>1、cover；这种做法会使图片布满div盒子，但会使图片部分内容丢失，就好比是把图片从左上角往右下角拉伸放大直到布满盒子，其他部分就没办法显示出来。</p>
</li>
<li><p>2、分别宽%  高%；这种做法是直接作用到图片上来实现图片在这个空间内的相对大小</p>
</li>
<li><p>3、contain；实际上也是将图片放大，但跟cover的区别就是cover是宽和高都接触到边界就会停止，而contain是其中一边碰到边界就会停止</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p>超链接样式</p>
<ul>
<li><p>a:link{}</p>
<ul>
<li>超链接“未访问”的样式</li>
</ul>
</li>
<li><p>a:visited{}</p>
<ul>
<li>超链接“访问后”的样式</li>
</ul>
</li>
<li><p>a:hover{}</p>
<ul>
<li>鼠标经过时的样式</li>
</ul>
</li>
<li><p>a:active{}</p>
<ul>
<li>鼠标单击超链接的样式</li>
</ul>
</li>
<li><p>cursor</p>
<ul>
<li>鼠标外观</li>
</ul>
</li>
</ul>
</li>
<li><p>盒子模型</p>
<ul>
<li><p>width</p>
<ul>
<li>宽度</li>
</ul>
</li>
<li><p>height</p>
<ul>
<li>高度</li>
</ul>
</li>
<li><p>border</p>
<ul>
<li>边框</li>
</ul>
</li>
<li><p>margin</p>
<ul>
<li>外边距</li>
</ul>
</li>
<li><p>padding</p>
<ul>
<li>内边距</li>
</ul>
</li>
</ul>
</li>
<li><p>浮动布局</p>
<ul>
<li><p>float:left;</p>
<ul>
<li>左浮动</li>
</ul>
</li>
<li><p>float:right;</p>
<ul>
<li>右浮动</li>
</ul>
</li>
<li><p>overflow: hidden;</p>
<ul>
<li>隐藏溢出</li>
</ul>
</li>
<li><p>clear:both;</p>
<ul>
<li>清除浮动</li>
</ul>
</li>
<li><p>防塌父元素:after{ /<em>清除浮动</em>/</p>
<ul>
<li><p>display:block;         //这里只有块级才可以！！行内块都不行</p>
</li>
<li><p>content: ‘’;</p>
</li>
<li><p>clear: both;</p>
</li>
</ul>
</li>
<li><p>}</p>
</li>
</ul>
</li>
<li><p>定位布局</p>
<ul>
<li><p>position:fixed;</p>
<ul>
<li><p>固定定位</p>
</li>
<li><p>语法：</p>
<ul>
<li><p>目标元素{</p>
<ul>
<li><p>position:fixed;</p>
</li>
<li><p>top/bottom/left/right:10px;</p>
</li>
<li><p>离浏览器窗口上边/下边/左边/右边距离10px；</p>
</li>
</ul>
</li>
<li><p>}</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>position:relative;</p>
<ul>
<li><p>相对定位</p>
</li>
<li><p>语法：</p>
<ul>
<li><p>目标元素{</p>
<ul>
<li><p>position:relative;</p>
</li>
<li><p>top/bottom/left/right:10px;</p>
</li>
<li><p>离原始位置上边/下边/左边/右边距离10px；</p>
</li>
</ul>
</li>
<li><p>}</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>position:absolute;</p>
<ul>
<li>绝对定位</li>
</ul>
</li>
<li><p>position:static;</p>
<ul>
<li>静态定位(默认值，无效果)</li>
</ul>
</li>
</ul>
</li>
<li><p>动画</p>
<ul>
<li><p>变形动画</p>
<ul>
<li><p>transform</p>
<ul>
<li><p>平移</p>
<ul>
<li>transform: translate(x,y);</li>
</ul>
</li>
<li><p>旋转</p>
<ul>
<li>transform: rotate(旋转度数deg);</li>
</ul>
</li>
<li><p>放大</p>
<ul>
<li>transform: scale(放大倍数);</li>
</ul>
</li>
<li><p>倾斜</p>
<ul>
<li>transform: skew(倾斜度数deg);</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p>过渡动画</p>
<ul>
<li><p>transition: 全部  动画时长  动态效果  开始延迟秒数；</p>
</li>
<li><p>transition: all 0.4s linear 0s;</p>
</li>
</ul>
</li>
<li><p>关键帧动画</p>
<ul>
<li><p>定义语法：例</p>
<ul>
<li><p>@keyframes name{</p>
<ul>
<li><p>0%   {background:red; left:0px; top:0px;}//初始位置背景红色；离左侧0px；离顶部0px；</p>
</li>
<li><p>25%  {background:yellow; left:200px; top:0px;}</p>
</li>
<li><p>50%  {background:blue; left:200px; top:200px;}</p>
</li>
<li><p>75%  {background:green; left:0px; top:200px;}</p>
</li>
<li><p>100% {background:red; left:0px; top:0px;}</p>
</li>
</ul>
</li>
<li><p>}</p>
</li>
</ul>
</li>
<li><p>引用语法：例</p>
</li>
<li><p>目标元素{</p>
<ul>
<li>animation:name 5s linear 2s infinite alternate;//调用动画：名字  时长  变化属性  初始延迟  无限次  交替来回；  </li>
</ul>
</li>
<li><p>}</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>弹性布局</p>
<ul>
<li><p>display：flex</p>
</li>
<li><pre><code class="html">&lt;a href=&quot;https://sm.ms/image/rKpo8Lb6jvXtVZG&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://s2.loli.net/2022/03/21/rKpo8Lb6jvXtVZG.png&quot; &gt;&lt;/a&gt;
</code></pre>
</li>
<li></li>
<li><p><a href="https://sm.ms/image/rKpo8Lb6jvXtVZG" target="_blank"><img src="https://s2.loli.net/2022/03/21/rKpo8Lb6jvXtVZG.png"></a>```</p>
</li>
<li><p><img src="/post/%E5%AE%B9%E5%99%A8%E5%B1%9E%E6%80%A7.jpg" alt="_posts"></p>
</li>
<li></li>
</ul>
</li>
</ul>
</li>
<li><p>常用伪类</p>
<ul>
<li><p>父元素:after{</p>
<ul>
<li><p>content:’’;</p>
</li>
<li><p>display:block;</p>
</li>
</ul>
</li>
<li><p>}</p>
<ul>
<li>说明：在父元素内最后加一个标签,可设置这个标签的各种属性</li>
</ul>
</li>
<li><p>父元素:before{</p>
<ul>
<li><p>content:’’;</p>
</li>
<li><p>display:block;</p>
</li>
</ul>
</li>
<li><p>}</p>
</li>
</ul>
</li>
</ul>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/HTML/" rel="tag"># HTML</a>
              <a href="/tags/CSS/" rel="tag"># CSS</a>
              <a href="/tags/HTML%E6%A0%87%E7%AD%BE/" rel="tag"># HTML标签</a>
              <a href="/tags/CSS%E6%A0%B7%E5%BC%8F/" rel="tag"># CSS样式</a>
              <a href="/tags/%E5%B8%B8%E7%94%A8%E7%9A%84/" rel="tag"># 常用的</a>
              <a href="/tags/%E7%BD%91%E9%A1%B5%E5%8A%A8%E7%94%BB/" rel="tag"># 网页动画</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/post/%E5%BC%82%E5%B8%B8%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2.html" rel="prev" title="异常、迭代器、内部类">
      <i class="fa fa-chevron-left"></i> 异常、迭代器、内部类
    </a></div>
      <div class="post-nav-item">
    <a href="/post/%E6%8D%A2%E4%B8%BB%E9%A2%98.html" rel="next" title="">
       <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%B8%B8%E7%94%A8HTML%E6%A0%87%E7%AD%BE-CSS%E6%A0%B7%E5%BC%8F"><span class="nav-number">1.</span> <span class="nav-text">常用HTML标签+CSS样式</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Key"
      src="https://s2.loli.net/2022/03/20/DnZUvt5SucgoGk3.jpg">
  <p class="site-author-name" itemprop="name">Key</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">4</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">12</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Key</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="//cdn.jsdelivr.net/npm/algoliasearch@4/dist/algoliasearch-lite.umd.js"></script>
<script src="//cdn.jsdelivr.net/npm/instantsearch.js@4/dist/instantsearch.production.min.js"></script>
<script src="/js/algolia-search.js"></script>














  

  

</body>
</html>
